package Protocol;

import java.util.HashMap;
import java.util.Map;

/**
 * @author jiaxv
 */
public class SmiLabelMap {
    public Map<String, String> LABEL_SMI_UP = new HashMap<>();
    public Map<String, String> LABEL_SMI_DOWN = new HashMap<>();

    /**
     * 单例化对象
     */
    public SmiLabelMap(){
        initUplinkSmiMap();
        initDownlinkLabelMap();
    }
    private static final SmiLabelMap slm = new SmiLabelMap();

    public static SmiLabelMap getInstance(){
        return slm;
    }

    /**
     * 初始化上行数据报LABEL转换SMI的map
     */
    private void initUplinkSmiMap(){
        LABEL_SMI_UP.put(":;","N/A");
        LABEL_SMI_UP.put("_j","N/A");
        LABEL_SMI_UP.put(":;}","N/A");
        LABEL_SMI_UP.put("_<DEL>","N/A");
        LABEL_SMI_UP.put("10","M10");
        LABEL_SMI_UP.put("11","M11");
        LABEL_SMI_UP.put("12","M12");
        LABEL_SMI_UP.put("13","M13");
        LABEL_SMI_UP.put("14","M14");
        LABEL_SMI_UP.put("15","M15");
        LABEL_SMI_UP.put("16","M16");
        LABEL_SMI_UP.put("17","M17");
        LABEL_SMI_UP.put("18","M18");
        LABEL_SMI_UP.put("19","M19");
        LABEL_SMI_UP.put("20","M20");
        LABEL_SMI_UP.put("21","M21");
        LABEL_SMI_UP.put("22","M22");
        LABEL_SMI_UP.put("23","M23");
        LABEL_SMI_UP.put("24","M24");
        LABEL_SMI_UP.put("25","M25");
        LABEL_SMI_UP.put("26","M26");
        LABEL_SMI_UP.put("27","M27");
        LABEL_SMI_UP.put("28","M28");
        LABEL_SMI_UP.put("29","M29");
        LABEL_SMI_UP.put("30","M30");
        LABEL_SMI_UP.put("31","M31");
        LABEL_SMI_UP.put("32","M32");
        LABEL_SMI_UP.put("33","M33");
        LABEL_SMI_UP.put("34","M34");
        LABEL_SMI_UP.put("35","M35");
        LABEL_SMI_UP.put("36","M36");
        LABEL_SMI_UP.put("37","M37");
        LABEL_SMI_UP.put("38","M38");
        LABEL_SMI_UP.put("39","M39");
        LABEL_SMI_UP.put("40","M40");
        LABEL_SMI_UP.put("41","M41");
        LABEL_SMI_UP.put("42","M42");
        LABEL_SMI_UP.put("43","M43");
        LABEL_SMI_UP.put("44","M44");
        LABEL_SMI_UP.put("45","M45");
        LABEL_SMI_UP.put("46","M46");
        LABEL_SMI_UP.put("47","M47");
        LABEL_SMI_UP.put("48","M48");
        LABEL_SMI_UP.put("49","M49");
        LABEL_SMI_UP.put("51","N/A");
        LABEL_SMI_UP.put("52","N/A");
        LABEL_SMI_UP.put("54","GVR");
        LABEL_SMI_UP.put("A1","CLX");
        LABEL_SMI_UP.put("A2","Unassigned");
        LABEL_SMI_UP.put("A3","CLD");
        LABEL_SMI_UP.put("A4","FSM");
        LABEL_SMI_UP.put("A5","Unassigned");
        LABEL_SMI_UP.put("A6","RAR");
        LABEL_SMI_UP.put("A7","FTU");
        LABEL_SMI_UP.put("A8","DDS");
        LABEL_SMI_UP.put("A9","DAI");
        LABEL_SMI_UP.put("A0","AFU");
        LABEL_SMI_UP.put("AA","ATC");
        LABEL_SMI_UP.put("AB","TWI");
        LABEL_SMI_UP.put("AC","PBC");
        LABEL_SMI_UP.put("AD","ETC");
        LABEL_SMI_UP.put("AE","Unassigned");
        LABEL_SMI_UP.put("AF","CPR");
        LABEL_SMI_UP.put("AG","Unassigned");
        LABEL_SMI_UP.put("C0","CP0");
        LABEL_SMI_UP.put("C1","AGM");
        LABEL_SMI_UP.put("C2","CP2");
        LABEL_SMI_UP.put("C3","CP3");
        LABEL_SMI_UP.put("C4","CP4");
        LABEL_SMI_UP.put("C5","CP5");
        LABEL_SMI_UP.put("C6","CP6");
        LABEL_SMI_UP.put("C7","CP7");
        LABEL_SMI_UP.put("C8","CP8");
        LABEL_SMI_UP.put("C9","CP9");
        LABEL_SMI_UP.put("DI","JDI");
        LABEL_SMI_UP.put("DL","JDL");
        LABEL_SMI_UP.put("H1","Various");
        LABEL_SMI_UP.put("H2","WXN");
        LABEL_SMI_UP.put("H4","WXC");
        LABEL_SMI_UP.put("KB","KBM");
        LABEL_SMI_UP.put("LC","JLC");
        LABEL_SMI_UP.put("LT","JLT");
        LABEL_SMI_UP.put("P7","PM7");
        LABEL_SMI_UP.put("P8","PM8");
        LABEL_SMI_UP.put("P9","PM9");
        LABEL_SMI_UP.put("Q4","N/A");
        LABEL_SMI_UP.put("S1","NSR" );
        LABEL_SMI_UP.put("S2","NPR");
        LABEL_SMI_UP.put("S3","APR");
        LABEL_SMI_UP.put("SQ","N/A");
        LABEL_SMI_UP.put("VA","VMA");
        LABEL_SMI_UP.put("VB","VMB");
        LABEL_SMI_UP.put("VC","VMC");
        LABEL_SMI_UP.put("VD","VMD");
        LABEL_SMI_UP.put("VE","VME");
        LABEL_SMI_UP.put("VF","VMF");
        LABEL_SMI_UP.put("VG","VMG");
        LABEL_SMI_UP.put("VH","VMH");
        LABEL_SMI_UP.put("VI","VMI");
        LABEL_SMI_UP.put("VJ","VMJ");
        LABEL_SMI_UP.put("VK","VMK");
        LABEL_SMI_UP.put("VL","VML");
        LABEL_SMI_UP.put("VM","VMM");
        LABEL_SMI_UP.put("VN","VMN");
        LABEL_SMI_UP.put("VO","VMO");
        LABEL_SMI_UP.put("VP","VMP");
        LABEL_SMI_UP.put("VQ","VMQ");
        LABEL_SMI_UP.put("VR","VMR");
        LABEL_SMI_UP.put("VS","VMS");
        LABEL_SMI_UP.put("VT","VMT");
        LABEL_SMI_UP.put("VU","VMU");
        LABEL_SMI_UP.put("VV","VMV");
        LABEL_SMI_UP.put("VW","VMW");
        LABEL_SMI_UP.put("VX","VMX");
        LABEL_SMI_UP.put("VY","VMY");
        LABEL_SMI_UP.put("VZ","VMZ");
        LABEL_SMI_UP.put("V1","VM1");
        LABEL_SMI_UP.put("V2","VM2");
        LABEL_SMI_UP.put("V3","VM3");
        LABEL_SMI_UP.put("V4","VM4");
        LABEL_SMI_UP.put("V5","VM5");
        LABEL_SMI_UP.put("V6","VM6");
        LABEL_SMI_UP.put("V7","VM7");
        LABEL_SMI_UP.put("V8","VM8");
        LABEL_SMI_UP.put("V9","VM9");
        LABEL_SMI_UP.put("X1","MX1");
        LABEL_SMI_UP.put("X2","MX2");
        LABEL_SMI_UP.put("X3","MX3");
        LABEL_SMI_UP.put("X4","MX4");
        LABEL_SMI_UP.put("X5","MX5");
        LABEL_SMI_UP.put("X6","MX6");
        LABEL_SMI_UP.put("X7","MX7");
        LABEL_SMI_UP.put("X8","MX8");
        LABEL_SMI_UP.put("X9","MX9");
    }

    /**
     * 初始化下行数据报LABEL转换SMI的map
     */
    private void initDownlinkLabelMap(){
        LABEL_SMI_DOWN.put("_<DEL>","N/A");
        LABEL_SMI_DOWN.put("00","HJK");
        LABEL_SMI_DOWN.put("10","M10");
        LABEL_SMI_DOWN.put("11","M11");
        LABEL_SMI_DOWN.put("12","M12");
        LABEL_SMI_DOWN.put("13","M13");
        LABEL_SMI_DOWN.put("14","M14");
        LABEL_SMI_DOWN.put("15","M15");
        LABEL_SMI_DOWN.put("16","M16");
        LABEL_SMI_DOWN.put("17","M17");
        LABEL_SMI_DOWN.put("18","M18");
        LABEL_SMI_DOWN.put("19","M19");
        LABEL_SMI_DOWN.put("20","M20");
        LABEL_SMI_DOWN.put("21","M21");
        LABEL_SMI_DOWN.put("22","M22");
        LABEL_SMI_DOWN.put("23","M23");
        LABEL_SMI_DOWN.put("24","M24");
        LABEL_SMI_DOWN.put("25","M25");
        LABEL_SMI_DOWN.put("26","M26");
        LABEL_SMI_DOWN.put("27","M27");
        LABEL_SMI_DOWN.put("28","M28");
        LABEL_SMI_DOWN.put("29","M29");
        LABEL_SMI_DOWN.put("30","M30");
        LABEL_SMI_DOWN.put("31","M31");
        LABEL_SMI_DOWN.put("32","M32");
        LABEL_SMI_DOWN.put("33","M33");
        LABEL_SMI_DOWN.put("34","M34");
        LABEL_SMI_DOWN.put("35","M35");
        LABEL_SMI_DOWN.put("36","M36");
        LABEL_SMI_DOWN.put("37","M37");
        LABEL_SMI_DOWN.put("38","M38");
        LABEL_SMI_DOWN.put("39","M39");
        LABEL_SMI_DOWN.put("40","M40");
        LABEL_SMI_DOWN.put("41","M41");
        LABEL_SMI_DOWN.put("42","M42");
        LABEL_SMI_DOWN.put("43","M43");
        LABEL_SMI_DOWN.put("44","M44");
        LABEL_SMI_DOWN.put("45","M45");
        LABEL_SMI_DOWN.put("46","M46");
        LABEL_SMI_DOWN.put("47","M47");
        LABEL_SMI_DOWN.put("48","M48");
        LABEL_SMI_DOWN.put("49","M49");
        LABEL_SMI_DOWN.put("51","N/A");
        LABEL_SMI_DOWN.put("52","N/A");
        LABEL_SMI_DOWN.put("54","AVR");
        LABEL_SMI_DOWN.put("57","AEP");
        LABEL_SMI_DOWN.put("5D","TIS");
        LABEL_SMI_DOWN.put("5P","N/A");
        LABEL_SMI_DOWN.put("5R","AEP");
        LABEL_SMI_DOWN.put("5U","WXR");
        LABEL_SMI_DOWN.put("5V","N/A");
        LABEL_SMI_DOWN.put("5Y","ETA");
        LABEL_SMI_DOWN.put("5Z","AGM");
        LABEL_SMI_DOWN.put("7A","ENG");
        LABEL_SMI_DOWN.put("7B","AGM");
        LABEL_SMI_DOWN.put("80","A80");
        LABEL_SMI_DOWN.put("81","A81");
        LABEL_SMI_DOWN.put("82","A82");
        LABEL_SMI_DOWN.put("83","A83");
        LABEL_SMI_DOWN.put("84","A84");
        LABEL_SMI_DOWN.put("85","A85");
        LABEL_SMI_DOWN.put("86","A86");
        LABEL_SMI_DOWN.put("87","A87");
        LABEL_SMI_DOWN.put("88","A88");
        LABEL_SMI_DOWN.put("89","A89");
        LABEL_SMI_DOWN.put("B1","RLC");
        LABEL_SMI_DOWN.put("B2","CLA");
        LABEL_SMI_DOWN.put("B3","RCD");
        LABEL_SMI_DOWN.put("B4","CDA");
        LABEL_SMI_DOWN.put("B5","POS");
        LABEL_SMI_DOWN.put("B6","PAR");
        LABEL_SMI_DOWN.put("B7","FTD");
        LABEL_SMI_DOWN.put("B8","RDS");
        LABEL_SMI_DOWN.put("B9","RAI");
        LABEL_SMI_DOWN.put("B0","AFD");
        LABEL_SMI_DOWN.put("BA","ATC");
        LABEL_SMI_DOWN.put("BB","TWR");
        LABEL_SMI_DOWN.put("BC","PBR");
        LABEL_SMI_DOWN.put("BD","ETR");
        LABEL_SMI_DOWN.put("BE","CPL");
        LABEL_SMI_DOWN.put("BF","CWR");
        LABEL_SMI_DOWN.put("BG","Unassigned");
        LABEL_SMI_DOWN.put("CA","SVC");
        LABEL_SMI_DOWN.put("CB","SVC");
        LABEL_SMI_DOWN.put("CC","SVC");
        LABEL_SMI_DOWN.put("CD","SVC");
        LABEL_SMI_DOWN.put("CE","SVC");
        LABEL_SMI_DOWN.put("CF","SVC");
        LABEL_SMI_DOWN.put("DI","JDI");
        LABEL_SMI_DOWN.put("DL","JDL");
        LABEL_SMI_DOWN.put("E1","EML");
        LABEL_SMI_DOWN.put("E2","EMS");
        LABEL_SMI_DOWN.put("F3","N/A");
        LABEL_SMI_DOWN.put("H1","Various");
        LABEL_SMI_DOWN.put("H2","WXM");
        LABEL_SMI_DOWN.put("H3","WXM");
        LABEL_SMI_DOWN.put("H4","WXC");
        LABEL_SMI_DOWN.put("HX","REJ");
        LABEL_SMI_DOWN.put("KB","KBM");
        LABEL_SMI_DOWN.put("LB","JLB");
        LABEL_SMI_DOWN.put("LS","JLS");
        LABEL_SMI_DOWN.put("M2","MVA");
        LABEL_SMI_DOWN.put("P1","PM1");
        LABEL_SMI_DOWN.put("P2","PM2");
        LABEL_SMI_DOWN.put("P3","PM3");
        LABEL_SMI_DOWN.put("P4","PM4");
        LABEL_SMI_DOWN.put("P5","PM5");
        LABEL_SMI_DOWN.put("P6","PM6");
        LABEL_SMI_DOWN.put("P0","PM0");
        LABEL_SMI_DOWN.put("PA","PMA");
        LABEL_SMI_DOWN.put("PB","PMB");
        LABEL_SMI_DOWN.put("PC","PMC");
        LABEL_SMI_DOWN.put("PD","PMD");
        LABEL_SMI_DOWN.put("PE","PME");
        LABEL_SMI_DOWN.put("PF","PMF");
        LABEL_SMI_DOWN.put("PG","PMG");
        LABEL_SMI_DOWN.put("PH","PMH");
        LABEL_SMI_DOWN.put("PI","PMI");
        LABEL_SMI_DOWN.put("PJ","PMJ");
        LABEL_SMI_DOWN.put("PK","PMK");
        LABEL_SMI_DOWN.put("PL","PML");
        LABEL_SMI_DOWN.put("PM","PMM");
        LABEL_SMI_DOWN.put("PN","PMN");
        LABEL_SMI_DOWN.put("PO","PMO");
        LABEL_SMI_DOWN.put("PP","PMP");
        LABEL_SMI_DOWN.put("PQ","PMQ");
        LABEL_SMI_DOWN.put("PR","PMR");
        LABEL_SMI_DOWN.put("PS","PMS");
        LABEL_SMI_DOWN.put("PT","PMT");
        LABEL_SMI_DOWN.put("PU","PMU");
        LABEL_SMI_DOWN.put("PV","PMV");
        LABEL_SMI_DOWN.put("PW","PMW");
        LABEL_SMI_DOWN.put("PX","PMX");
        LABEL_SMI_DOWN.put("PY","PMY");
        LABEL_SMI_DOWN.put("PZ","PMZ");
        LABEL_SMI_DOWN.put("Q0","N/A");
        LABEL_SMI_DOWN.put("Q1","AGM");
        LABEL_SMI_DOWN.put("Q2","ETA");
        LABEL_SMI_DOWN.put("Q3","CLK");
        LABEL_SMI_DOWN.put("Q5","SVC");
        LABEL_SMI_DOWN.put("Q6","N/A");
        LABEL_SMI_DOWN.put("Q7","DLA");
        LABEL_SMI_DOWN.put("QA","DEP");
        LABEL_SMI_DOWN.put("QB","DEP");
        LABEL_SMI_DOWN.put("QC","ARR");
        LABEL_SMI_DOWN.put("QD","ARR");
        LABEL_SMI_DOWN.put("QE","DEP");
        LABEL_SMI_DOWN.put("QF","DEP");
        LABEL_SMI_DOWN.put("QG","RTN");
        LABEL_SMI_DOWN.put("QH","DEP");
        LABEL_SMI_DOWN.put("QK","ARR");
        LABEL_SMI_DOWN.put("QL","ARR");
        LABEL_SMI_DOWN.put("QM","ARR");
        LABEL_SMI_DOWN.put("QN","DIV");
        LABEL_SMI_DOWN.put("QP","DEP");
        LABEL_SMI_DOWN.put("QQ","DEP");
        LABEL_SMI_DOWN.put("QR","ARR");
        LABEL_SMI_DOWN.put("QS","ARR");
        LABEL_SMI_DOWN.put("QT","RTN");
        LABEL_SMI_DOWN.put("QV","N/A");
        LABEL_SMI_DOWN.put("QX","SVC");
        LABEL_SMI_DOWN.put("RB","RDO");
        LABEL_SMI_DOWN.put("RE","JRE");
        LABEL_SMI_DOWN.put("RF","JRF");
        LABEL_SMI_DOWN.put("S1","NSR");
        LABEL_SMI_DOWN.put("S2","NPR");
        LABEL_SMI_DOWN.put("S3","APR");
        LABEL_SMI_DOWN.put("SA","MED");
        LABEL_SMI_DOWN.put("VA","VMA");
        LABEL_SMI_DOWN.put("VB","VMB");
        LABEL_SMI_DOWN.put("VC","VMC");
        LABEL_SMI_DOWN.put("VD","VMD");
        LABEL_SMI_DOWN.put("VE","VME");
        LABEL_SMI_DOWN.put("VF","VMF");
        LABEL_SMI_DOWN.put("VG","VMG");
        LABEL_SMI_DOWN.put("VH","VMH");
        LABEL_SMI_DOWN.put("VI","VMI");
        LABEL_SMI_DOWN.put("VJ","VMJ");
        LABEL_SMI_DOWN.put("VK","VMK");
        LABEL_SMI_DOWN.put("VL","VML");
        LABEL_SMI_DOWN.put("VM","VMM");
        LABEL_SMI_DOWN.put("VN","VMN");
        LABEL_SMI_DOWN.put("VO","VMO");
        LABEL_SMI_DOWN.put("VP","VMP");
        LABEL_SMI_DOWN.put("VQ","VMQ");
        LABEL_SMI_DOWN.put("VR","VMR");
        LABEL_SMI_DOWN.put("VS","VMS");
        LABEL_SMI_DOWN.put("VT","VMT");
        LABEL_SMI_DOWN.put("VU","VMU");
        LABEL_SMI_DOWN.put("VV","VMV");
        LABEL_SMI_DOWN.put("VW","VMW");
        LABEL_SMI_DOWN.put("VX","VMX");
        LABEL_SMI_DOWN.put("VY","VMY");
        LABEL_SMI_DOWN.put("VZ","VMZ");
        LABEL_SMI_DOWN.put("V1","VM1");
        LABEL_SMI_DOWN.put("V2","VM2");
        LABEL_SMI_DOWN.put("V3","VM3");
        LABEL_SMI_DOWN.put("V4","VM4");
        LABEL_SMI_DOWN.put("V5","VM5");
        LABEL_SMI_DOWN.put("V6","VM6");
        LABEL_SMI_DOWN.put("V7","VM7");
        LABEL_SMI_DOWN.put("V8","VM8");
        LABEL_SMI_DOWN.put("V9","VM9");
        LABEL_SMI_DOWN.put("X1","MX1");
        LABEL_SMI_DOWN.put("X2","MX2");
        LABEL_SMI_DOWN.put("X3","MX3");
        LABEL_SMI_DOWN.put("X4","MX4");
        LABEL_SMI_DOWN.put("X5","MX5");
        LABEL_SMI_DOWN.put("X6","MX6");
        LABEL_SMI_DOWN.put("X7","MX7");
        LABEL_SMI_DOWN.put("X8","MX8");
        LABEL_SMI_DOWN.put("X9","MX9");
    }
}
